<?php if ( ! defined('WDK_PATH')) exit('No direct script access allowed');?>
<!--{**************************************************************************}-->
<style>
.msgbox	{line-height: 250%;width:300px;margin:40px auto;border:3px double #D9D9D9;padding:10px 40px 40px;;background-color: #FFF;}
b		{color:#DC4616}
.msgbox label	{width:80px;float:left;margin-right: 10px;}
</style>
<!--{**************************************************************************}-->
<h1 class="title">아이디 / 비밀번호 찾기</h1>
<div style="width:85%;margin:0px auto;height:300px;">
	<div class="msgbox fl">
		<h1>아이디 찾기</h1>
		<form id="find_id" action="" method="POST">
		<input type="hidden" name="mode" value="findid"/>
		<input type="reset" style="display:none;"/>
			<label><b>이 름</b> :</label> 
			<input type="text" name="user_name" class="input"/>
			<br/>
			<label><b>이메일 주소</b> :</label> 
			<input type="text" name="user_email" class="input"/>
			<a class="btn">확인</a>
		</form>
	</div>
	<div class="msgbox fr">
		<h1>비밀번호찾기</h1>
		<form id="find_pwd" action="" method="POST">
		<input type="hidden" name="mode" value="findpwd"/>
		<input type="reset" style="display:none;"/>
			<label><b>아이디</b> :</label> 
			<input type="text" name="user_login_id" class="input"/>
			<br/>
			<label><b>이메일 주소</b> :</label> 
			<input type="text" name="user_email" class="input"/>
			<a class="btn">확인</a>
		</form>
	</div>
</div>
<!--{**************************************************************************}-->
<script>
(function($){
	$('#find_id a.btn').click(function(){
		if($('#find_id :text[name=user_name]').val() == '')
		{
			alert('이름을 입력하십시오.');
			return $('#find_id :text[name=user_name]').focus();
		}
		if($('#find_id :text[name=user_email]').val() == '')
		{
			alert('이메일을 입력하십시오.');
			return $('#find_id :text[name=user_email]').focus();
		}
		$.post('/user/find', $('#find_id').serializeArray(), function(json){
			if(json.error)	return alert(json.msg);
			alert(json.msg);
			$('#find_id :reset').click();
		}, 'json');
	});
	$('#find_pwd a.btn').click(function(){
		if($('#find_pwd :text[name=user_login_id]').val() == '')
		{
			alert('아이디를 입력하십시오.');
			return $('#find_pwd :text[name=user_login_id]').focus();
		}
		if($('#find_pwd :text[name=user_email]').val() == '')
		{
			alert('이메일을 입력하십시오.');
			return $('#find_pwd :text[name=user_email]').focus();
		}
		$.post('/user/find', $('#find_pwd').serializeArray(), function(json){
			if(json.error)	return alert(json.msg);
			alert(json.msg);
			$('#find_id :reset').click();
		}, 'json');
	});
})(jQuery);
</script>
<!--{**************************************************************************}-->